<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen"/>
    <link rel="stylesheet" href="../css/aboveTool.css" type="text/css" media="screen"/>
    <script type="text/javascript" src="../js/jquery-3.6.0.min.js"></script>
</head>
<body>
<div th:replace="common/IncludeTop::header"></div>
<div id="Content">
    <h2>My Orders</h2>

    <table>
        <tr>
            <th>Order ID</th>
            <th>Date</th>
            <th>Total Price</th>
        </tr>

            <tr th:each="order:${orderList}">
                <td>
                    <a th:href="@{'/order/viewOrder?orderId='+${order.orderId}}" th:text="${order.orderId}">${order.orderId} </a>
                </td>
                <td th:text="${#dates.format(order.orderDate,'yyyy/MM/dd hh:mm:ss')}">
                </td>
                <td th:text="${#numbers.formatDecimal(order.totalPrice,3,'COMMA',2,'POINT')}">
                </td>
            </tr>
    </table>
</div>
<div th:replace="common/IncludeBottom::footer"></div>
</body>
</html>